/**
 * bird 
 */
function Bird() {
	this.fallSpeed = 10;

}
Bird.prototype = {
	init: function() {
		var _this = this;
		this.play_bird = $(".play-bird");
		this.play_bird.style.display = 'block';
		this.fall().jump();
		return this;
	},
	fall: function() {
		var _this = this;
		this.fall_interval = setInterval(function(){
			
			if(_this.play_bird.offsetTop > new GameEngine().main.offsetHeight || _this.play_bird.offsetTop <_this.play_bird.offsetHeight){
				new GameEngine().stop();
			}
			_this.play_bird.style.top = getStyle(_this.play_bird,'top',false) + _this.fallSpeed++ +"px";
			
		},100);
		return this;
	},
	jump: function() {
		var _this = this;
		console.log("jump");
		this.jumpCallback = function(){
			_this.fallSpeed -=5;
		}
		eventUtils.addEvent(document,'keydown',_this.jumpCallback);
		
		return this;
	},
	forbidJump : function(){
		var _this = this;
		eventUtils.removeEvent(document,'keydown',_this.jumpCallback);
	}
	
}